package oppsa.controller;

//Variables
public class User {
	private int sequence;
	private String firstName;
	private String lastName;
	private String company;
	private String mail;
	private String login;
	private String password;
	private int seqProject;
	
	public User() {
		this.sequence = -1;
		this.firstName = null;
		this.lastName = null;
		this.company = null;
		this.mail = null;
		this.login=null;
		this.password = null;
		this.seqProject = 0;
	}
	public User(int sequence, String firstName, String lastName,
			String company, String mail,String login, String password, int seqProject) {
		this.sequence = sequence;
		this.firstName = firstName;
		this.lastName = lastName;
		this.company = company;
		this.mail = mail;
		this.login=login;
		this.password = password;
		this.seqProject = seqProject;
	}
	public User(User u) {
		this.sequence = u.sequence;
		this.firstName = u.firstName;
		this.lastName = u.lastName;
		this.company = u.company;
		this.mail = u.mail;
		this.login=u.login;
		this.password = u.password;
		this.seqProject = u.seqProject;
	}
	
	//Getters & Setters
	public int getSequence() {
		return sequence;
	}
	public void setSequence(int sequence) {
		this.sequence = sequence;
	}
	public String getFirstName() {
		return firstName;
	}
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}
	public String getLastName() {
		return lastName;
	}
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}
	public String getCompany() {
		return company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getMail() {
		return mail;
	}
	public void setMail(String mail) {
		this.mail = mail;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public int getseqProject() {
		return seqProject;
	}
	public void setseqProject(int seqProject) {
		this.seqProject = seqProject;
	}
	
	public boolean compareTo(User u)
	{
		
		if (this.sequence == u.sequence && this.firstName == u.firstName && this.lastName == u.lastName
				&& this.company == u.company && this.mail == u.mail && this.password == u.password && this.seqProject == u.seqProject) {
				return true;
		}
		
		return false;
	}
	@Override
	public String toString() {
		return "User [sequence=" + sequence + ", firstName=" + firstName + ", lastName=" + lastName + ", company=" + company + ", mail=" + mail + ", password=" + password + ", seqProject=" + seqProject + "]";
	}
	public void setLogin(String string) {
		// TODO Auto-generated method stub
		
	}
	public String getLogin() {
		// TODO Auto-generated method stub
		return login;
		
	}	
}
